#!/usr/bin/env python
#coding:utf-8

import cgi
import cgitb
import htmlheader

htmlheader.htmlheader("Using 'get' with forms")
print """<p>Enter one of your favorite words here:<br /></p>
<form method="get" action="fig06.py">
<p>
<input type="text" name="word" />
<input type="submit" value="Submit word" />
</p>
</form>"""

pairs = cgi.parse()
if pairs.has_key("word"):
    print """<p>Your words is :
    <span style="font-weight: bold">%s</span></p>"""\
         % cgi.escape(pairs["word"][0])

htmlheader.htmlend()
